<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %>
<%@ page import="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter" %>
<%@ page import="org.acegisecurity.AuthenticationException" %>
<%--@ taglib prefix="form" uri="http://www.springframework.org/tags/form" --%>

<html>
	<head>
		<title><dlss:message key="login.title"/></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<link href="static/css/style.css" rel="stylesheet" type="text/css"></link>
        <script>
        	//	Field "j_username" will be autofocused after window loaded.
            //  It helps to log on faster.
            window.onload = function() {
            	document.getElementById("j_username").focus();
            }
       	</script>
	</head>

<body>
    <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
        <tr>
            <td valign="middle" align="center">
               	<c:if test="${not empty param.login_error}">
			      <font color="red" class="title">
			        Your login attempt was not successful, try again.<BR><BR>
			        Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
			      </font>
			    </c:if>
               	<!-- form:form method="post" commandName="user"-->
				<form action="<c:url value='j_acegi_security_check'/>" method="POST">
                    <table cellpadding="0" cellspacing="0" border="0" width="508" height="383">
                        <tr>
                            <td valign="top">
                                <table cellpadding="0" cellspacing="10" border="0" width="100%" height="100%">
                                    <tr>
                                        <td class="lightBlueArea" align="center">
                                            <table width="300" cellpadding="0" cellspacing="5" border="0">
                                                <tr>
                                                    <td class="title"><dlss:message key="login.user"/></td>
                                                    <td rowspan="5" class="title" width="80" align="right" valign="middle">
                                                        <br/>
                                                        <input type="image" src="static/images/okButton.png"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                       	<!-- form:input path="user" id="j_username" cssClass="textField" size="35" tabindex="1" /-->
                                                       	<input id="j_username" name="j_username" class="textField" size="35" tabindex="1" <c:if test="${not empty param.login_error}">value='<c:out value="${ACEGI_SECURITY_LAST_USERNAME}"/>'</c:if>>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="8"/>
                                                </tr>
                                                <tr>
                                                    <td class="title"><dlss:message key="login.password"/></td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <input name="j_password" type="password" class="textField" size="35" tabindex="2"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                	<td class="title"><input class="textField" type="checkbox" name="_acegi_security_remember_me"> <dlss:message key="remember.me"/></td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <div style="display:none;">
                                    <input name="submit" id="submit-button" type="submit" tabindex="3"/>
                                </div>
                            </td>
                        </tr>
                    </table>
                </form> 
                <!-- /form:form -->
            </td>
        </tr>
    </table>
</body>

</html>
	